package ltd.bugs.cute.common.spring;

import java.util.Properties;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;

public class CutePropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer {

  @Override
  protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess,
      Properties props) throws BeansException {
    super.processProperties(beanFactoryToProcess, props);
    // 设置到静态类中，方便使用
    ApplicationConfiguration.setProperties(props);
  }
}
